package apiroutes

import (
	"dataaysn/internal/service"

	"github.com/gin-gonic/gin"
)

func RegisterSSHConfigRoutes(r *gin.Engine, sshConfigService *service.SSHConfigService) {
	sshGroup := r.Group("/api/ssh-configs")
	{
		sshGroup.POST("", sshConfigService.CreateConfig)
		sshGroup.GET("", sshConfigService.ListConfigs)
		sshGroup.GET("/:id", sshConfigService.GetConfig)
		sshGroup.PUT("/:id", sshConfigService.UpdateConfig)
		sshGroup.DELETE("/:id", sshConfigService.DeleteConfig)
		sshGroup.POST("/test", sshConfigService.TestConnection)
	}
}
